{% extends 'stark/layout.html' %}

{% block content %}
<div class="btn-group" style="margin: 5px 0">
    <a class="btn btn-default" href="{% url 'rbac_role_add' %}">
        <i class="fa fa-plus-square" aria-hidden="true">
        </i>
        添加角色
    </a>
</div>

<table class="table table-bordered table-hover">
    <thead>
        <tr>
            <th>ID</th>
            <th>名称</th>
            <th>选项</th>
        </tr>
    </thead>
    <tbody>
        {% for row in role_list %}
        <tr>
            <td>{{ row.id }}</td>
            <td>{{ row.title }}</td>
            <td>
                <a style="color: #333333;" href="{% url 'rbac_role_edit' rid=row.id %}">
                    <i class="fa fa-edit" aria-hidden="true">
                    </i>
                    编辑
                </a>
                |
                <a style="color: #d9534f;" href="{% url 'rbac_role_del' rid=row.id %}">
                    <i class="fa fa-trash-o">
                    </i>
                    删除
                </a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}